package com.example.demo.order.exception;

import lombok.Getter;

/**
 * @ClassName BusinessException
 * @Description
 * @Author MingChang.Wei
 * @Date 2025/8/8
 **/
@Getter
public class BusinessException extends RuntimeException {

    private final Integer code; // 自定义业务异常码

    public BusinessException(String message) {
        super(message);
        this.code = 500; // 默认业务异常码
    }

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
